{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "with open('geojson-data.json', 'r') as f:\n",
    "    geojsonString = f.read()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import json\n",
    "\n",
    "geojson = json.loads(geojsonString)\n",
    "data = list(map(lambda x: {**x['properties'], \"_geometry\": x['geometry']}, geojson['features']))\n",
    "print(data)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from pyl7vp import L7VP\n",
    "\n",
    "l7vp_map = L7VP(height = 600)\n",
    "\n",
    "# Add dataset to map\n",
    "l7vp_map.add_dataset({\"id\": \"my_dataset\", \"type\": 'local', \"data\": data})\n",
    "\n",
    "# Display map\n",
    "l7vp_map.show()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "test-env",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.2"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
